#pragma once
#include "xKernel/IxDraw.h"
#include "xKernel/IxBuilder.h"

[
    default(IxBuilder),
    threading(free),
    uuid("3F7B7435-5EA7-4b66-8D36-6B097AB2A301"),
    coclass
]
class ATL_NO_VTABLE CxBuilder
    : public IxBuilder
{
public:
    CxBuilder();
    virtual ~CxBuilder();

public:
    // interface of IxBuilder
    HRESULT CreateFromFile(BSTR bsFile, IUnknown** ppUnk);
    HRESULT CreateFromDescription(IxPairVec* pVec, IUnknown** ppUnk);
    //HRESULT Create

protected:
    HRESULT _create_from_description(IxPairVec* pVec, IUnknown** ppUnk);
    HRESULT _create_children_from_description(IxPairVec* pVec, IxNode* pParent);
};